# $Id: PKGBUILD 156266 2012-04-16 14:12:28Z jgc $
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=openjpeg
pkgver=1.5.0
pkgrel=1
pkgdesc="An open source JPEG 2000 codec"
arch=(i686 x86_64)
license=('BSD')
url="http://www.openjpeg.org"
depends=('zlib')
options=('!libtool')
source=(http://openjpeg.googlecode.com/files/openjpeg-${pkgver}.tar.gz)
sha1sums=('dce705ae45f137e4698a8cf39d1fbf22bc434fa8')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  # make sure we use system libs
  rm -rf thirtparty
  ./configure --prefix=/usr \
	--disable-static --disable-silent-rules
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -m755 -d "${pkgdir}/usr/share/licenses/openjpeg"
  install -m644 LICENSE "${pkgdir}/usr/share/licenses/openjpeg/LICENSE"
}
